package com.augurit.gzcgwsp.webservice;

import java.net.MalformedURLException;
import java.util.Date;
import org.codehaus.xfire.XFire;
import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;
import com.augurit.gzcgwsp.webservice.service.IJinpengDataService;

public class Test {

	/**
	 * @param args
	 * @throws Exception
	 * @throws MalformedURLException
	 */
	public static void main(String[] args) throws MalformedURLException,Exception {
		String url = "http://192.168.15.171:8080/gzcgwsp/services/IJinpengDataService";
		Service service = (Service) new ObjectServiceFactory()
				.create(IJinpengDataService.class);
		XFire xFire = XFireFactory.newInstance().getXFire();
		XFireProxyFactory factory = new XFireProxyFactory(xFire);
		try {
			IJinpengDataService dataservice = (IJinpengDataService) factory.create(service, url);
			
			Date sDate = new Date();
			Date eDate = new Date();
			sDate.setYear(sDate.getYear()-1);
			//取燃气经营许可的数据
//			String results = dataservice.getRqjyxkDatas("1","10",sDate,eDate);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			//取户外广告的数据
//			String results = dataservice.getHwggDatas("1","1",null,null);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			//取陆域的数据
//			String results = dataservice.getShljqsDatas("1","10000",null,null);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			//取企业资质数据
//			String results = dataservice.getRqQyzzDatas("1","10000",null,null);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			//取水域的数据
//			String results = dataservice.getShljysDatas("1","10000",null,null);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			//取处置的数据
//			String results = dataservice.getShljczDatas("1","10000",null,null);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			//取余泥处-排放的数据
//			String results = dataservice.getYncPfDatas("1","10000",null,null);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			//取余泥处-消纳的数据
//			String results = dataservice.getYncXnDatas("1","10000",null,null);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			//取余泥处-运输的数据
			String results = dataservice.getYncYsDatas("1","10000",null,null);//传入的参数为当前页、每页显示的条数、开始日期、结束日期
			
			System.out.println(results);
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
	}
}
